
export function loadTMap() {
    return new Promise(function(resolve, reject) {
      if (typeof window.TMap !== 'undefined') {
        resolve(window.TMap)
        return true
      }
      window.onBMapCallback = function() {
        resolve(window.TMap)
      }
      let script = document.createElement('script')
      script.type = 'text/javascript'
      script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=1228c9cabcc4b37223914680570fdc11'
      
      script.onload = function () {
        resolve(window.TMap)
      };
      script.onerror = reject
      document.head.appendChild(script)
    })
  }
// http://api.tianditu.gov.cn/qv?tk=403623d62e32fbbf8a68d57445473f04&t=0.9018656439091708&callback=T.qv"
  